import { get, post, del } from '../http';
import { LoginParams, UserProfile } from './types';

export const UserApi = {
  login: (credentials: LoginParams) => 
    post<UserProfile>('/auth/login', credentials),

  getProfile: () => 
    get<UserProfile>('/system/user/getInfo'),

  updateProfile: (data: Partial<UserProfile>) => 
    post<UserProfile>('/user/profile', data),

  deleteAccount: () => 
    del<void>('/user')
};